home *** CD-ROM | disk | FTP | other *** search
- Path: dbridger.inlink.com!user
- From: dbridger@inlink.com (Dave Bridger)
- Newsgroups: comp.lang.c++
- Subject: Re: Is C portable?
- Date: Sun, 11 Feb 1996 01:10:20 -0600
- Organization: inlink
- Message-ID: <dbridger-1102960110200001@dbridger.inlink.com>
- References: <4fg601$7o9@azure.acsu.buffalo.edu>
- NNTP-Posting-Host: dbridger.inlink.com
-
- In article <4fg601$7o9@azure.acsu.buffalo.edu>, boonteh@acsu.buffalo.edu
- (Ricky B Teh) wrote:
-
- > Just a simple question:
- > Do you think C a portable language?
- >
- > -Rick
-
- Certainly. Compilers for the C language have been written for a large
- number of different computers over the last twenty years. Now if you are
- really asking whether or not programs written in C are portable, that
- answer depends on how the program was written. Programs can be written to
- be portable or not. If the programmer is careful, then C programs can be
- transparently portable depending, of course, upon the Operating System
- environment in which they run. On the other hand, a C program that depends
- upon specific features of the hardware on which is runs such as word size,
- or fixed memory locations, can be so non-portable as to be totally useless
- on any other processor or even computer configuration.
-
- The overriding consideration, however, is that even if C programs
- themselves are not always portable, C Programmers are generally portable
- and often, after relatively minor adjustments, can be used to produce
- programs that run on a large number of different computers.
-
- --Dave
- --
- The Reality Razors:
- 1) Never ascribe to malice that which can be easily attributed to stupidity.
- 2) Never ascribe to planning that which can be easily attributed to luck.
- 3) Never ascribe to conspiracy that which can be easily be attributed to coincidence.
-